#ifndef DICCIONARIO_H_
#define DICCIONARIO_H_

typedef struct dictioStruct
{
	char ** words;
	int wordCount; //cantidad total de palabras
	int wordsSize; //size del vector de words
	int currentWord; //indice de palabra
	int maxWordLen; //maxima longitud de palabra
} dictioStruct;

/**
 * Starts the dictionary dictioStruct structure
 *
 * @param[in]	maxWordLen	The maximum length a word can have.
 *
 * @return		a dictioStruct structure, or NULL in case of error.
 */
dictioStruct * openDictionary(char * dictioName, int maxWordLen);

/**
 * Gets a key from the dictionary.
 *
 * @param[in]		dictionary	The dictionary to get the key.
 * @param[out]		dest		A key of the dictionary.
 *
 * @return			1 if there are still more possible keys, 0 if there
 * 					are not.
 */
int getKey(dictioStruct * dictionary, char * dest);

/**
 * Gets a key from the dictionary.
 *
 * @param[in]		dictionary	The dictionary where the word will be added.
 * @param[in]		word		The word to be added.
 *
 * @return			1 if successfull, -1 in case of error.
 */
int addWord(dictioStruct * dictionary, char * word);

void freeDictionary(dictioStruct * dictionary);

#endif /*DICCIONARIO_H_*/

